package com.itlong.cloud.POJO.PO;

import com.itlong.cloud.annotation.ItlField;
import com.itlong.cloud.annotation.ItlTables;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <desc>
 *      云对讲设备信息表。 围墙机归属于多栋（含1栋），门口机既可能多栋，又可能1栋多单元
 * </desc>
 *
 * @createDate 2017/09/20
 */
@ItlTables("device_cloud_intercom_info")
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper=true)
public class DeviceCloudIntercomInfoPO extends BasePO implements Serializable {

    @ItlField(value = "device_unique", logicKey = "key", notNull = "false")
    private String deviceUnique;            //设备全局唯一序列号(项目编号[8位] + 设备类型[1位] + 设备ID[4位])

    @ItlField("device_id")
    private String deviceId;                //设备ID，即设备机号，与设备硬件拨码对应。

    @ItlField("device_name")
    private String deviceName;              //设备名称，一般由客户自定义。

    @ItlField("project_id")
    private String projectId;               //小区编号,即项目编号，由8位数字构成,00000001~99999999.

    @ItlField("product_type_id")
    private String productTypeId;          // 产品型号ID,如"1700003415"，与“产品信号信息表”中的type_pid一致

    @ItlField("smart_type")
    private Integer smartType;              //云对讲类型，31-门口机，32-围墙机

    @ItlField("config_type")
    private Integer configType;             //配置方式(0:手动 1:自动)

    @ItlField("local_ip")
    private String localIp;                 //设备IP

    @ItlField("local_gw")
    private String localGw;                 //设备本地网关

    @ItlField("local_dns")
    private String localDns;                //设备DNS

    @ItlField("voice_gw")
    private String voiceGw;                  //语音网关

    @ItlField("local_server")
    private String localServer;             //本地服务器地址，如本地一卡通服务器地址

    @ItlField("lock_type")
    private Integer lockType;               //锁类型(1-电子锁  2-磁力锁)

    @ItlField("delay_time")
    private Integer delayTime;              //开门延时，单位:秒

    @ItlField("speaker_volume")
    private Integer speakerVolume;          //扬声器音量

    @ItlField("mic_volume")
    private Integer micVolume;              //麦克风音量

    @ItlField("sn")
    private String sn;                      //sn,按腾讯要求自定义(项目编号(8) + 楼栋(3) + 单元(2) + 设备id(3))的16位字符串,围墙机楼栋和单元全为0

    @ItlField("license")
    private String license;                 //证书,由签名公钥、签名私钥、sn、项目编号计算而来

    @ItlField("md5")
    private String md5;                     //校验值,证书的md5值

    @ItlField("din")
    private String din;

    @ItlField("qr_code")
    private String qrCode;                 //二维码图标地址

    @ItlField("sip_account")
    private String sipAccount;              //sip账号

    @ItlField("sip_psd")
    private String sipPsd;                  //sip密码

    @ItlField("device_memo")
    private String deviceMemo;              //设备说明

    @ItlField("standby_image_url")
    private String standbyImageUrl;         //待机界面图片url

    @ItlField("is_face_recognition")
    private Integer isFaceRecognition;      //是否支持人脸识别 0代表否 1代表是

    @ItlField("batch_number")
    private String batchNumber;             //批次号

    @ItlField("token")
    private String token;       //请求凭证

    @ItlField("cloud_intercom_account_id")
    private String cloudIntercomAccountId;      //与第三方账号信息表相关联

    @ItlField("iot_device_id")
    private String iotDeviceId;             //阿里云颁发的设备id，全局唯一

    @ItlField("iot_device_secret")
    private String iotDeviceSecret;         //设备私钥

    @ItlField("iot_device_status")
    private String iotDeviceStatus;         //设备状态，目前预留

    @ItlField("iot_device_work_status")
    private  String iotDeviceWorkStatus;    //设备工作状态,ONLINE, OFFLINE, UNACTIVE
    @ItlField("equip_mode")
    private Integer equipMode;              // 设备模式，1普通，2收费

    @ItlField("apk")
    private String apk;              //安卓的版本号
    @ItlField("linux_appVer")
    private String linuxAppVer;              // Linux设备程序版本


    public DeviceCloudIntercomInfoPO(String deviceUnique) {
        this.deviceUnique = deviceUnique;
    }
}